<?php

namespace App\Http\Middleware;

use App\Repository\Sys\Sys;
use Closure;


class AfterRequestRecord
{
    /**
     * 记录请求数据
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Closure $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $response = $next($request);
        Sys::writeRequestData();
        return $response;
    }
}
